import axios from '@/axios'
import apiUrl from '../urls/base'

export default {
    login: (request) => {
        return axios.request({
            url: apiUrl.Login,
            method: 'POST',
            data: request
        })
    },
    logout: () => {
        return axios.request({
            url: apiUrl.Logout,
            method: 'GET',
        })
    },
    getSystemMenu: () => {
        return axios.request({
            url: apiUrl.systemMenu,
            method: 'get'
        })
    },
    searchUser: (name) => {
        return axios.request({
            url: apiUrl.searchUser,
            method: 'get',
            params: { name }
        })
    },
    transactionList: (query) => {
        return axios.request({
            url: apiUrl.transactionList,
            method: 'get',
            params: query
        })
    },
    qiniuUploadToken: () => {
        return axios.request({
            url: apiUrl.qiniuUploadToken,
            method: 'get'
        })
    },

}